package com.miao.hong.fang.index.service;

import com.miao.hong.fang.course.dao.CourseDAO;
import com.miao.hong.fang.teacher.dao.TeacherDAO;
import com.miao.hong.fang.util.pagination.ListAndCount;

import java.util.List;

public class IndexServiceImpl implements IndexService{

	private CourseDAO courseDAO;
	private TeacherDAO teacherDAO;
	
	public void setCourseDAO(CourseDAO courseDAO) {
		this.courseDAO = courseDAO;
	}

	public void setTeacherDAO(TeacherDAO teacherDAO) {
		this.teacherDAO = teacherDAO;
	}

	public ListAndCount getPublicCourse() {
		return courseDAO.getPublicCourse(null, null, null);
	}
	
	public List getHotCourse() {
		return courseDAO.getHotCourse();
	}
	
	public List getRecommendedCourse() {
		return courseDAO.getRecommendedCourse();
	}
	
	public List getCityCourse(String cityName) {
		return courseDAO.getCityCourse(cityName);
	}
	
	public List getCourseByCategory(String courseCategory) {
		return courseDAO.getCourseByCategory(courseCategory);
	}
}
